Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Java Tutorial
1) 2D Graphics
2) Ant
3) Apache Common
4) Class Definition
5) Collections
6) Data Type
7) Database
8) Design Pattern
9) Development
10) EJB3
11) Email
12) File
13) Generics
14) Hibernate
15) Internationalization
16) J2EE Application
17) J2ME
18) JPA
19) JSP
20) JSTL
21) JUnit
22) Language
23) Log
24) Network
25) Operators
26) PDF
27) Reflection
28) Regular Expressions
29) Security
30) Servlet
31) Spring
32) Statement Control
33) Swing
34) Swing Event
35) SWT
36) SWT 2D Graphics
37) Thread
38) Web Services SOA
39) XML
Security
1) A Blowfish example
2) Adding a Certificate to a Key Store
3) Adding Extensions to a Certification Request
4) AES Key generator
5) AES wraps RSA
6) Allows anyone to listen on un-privileged ports
7) An alternate SHA Interleave algorithm as implemented in the SRP distribution
8) An example of using RSA to encrypt a single asymmetric key
9) An RSA sample application
10) Asymmetric Key Maker
11) Basic class for exploring PKCS #1 V1 5 Signatures
12) Basic class to confirm the Bouncy Castle provider is installed
13) Basic demonstration of precedence
14) Basic IO example using SHA1
15) Basic RSA example
16) Basic stream cipher example
17) Basic symmetric encryption example
18) Basic symmetric encryption example with CTR using DES
19) Basic symmetric encryption example with padding
20) Basic symmetric encryption example with padding and CBC using DES
21) Basic symmetric encryption example with padding and ECB using DES
22) Blowfish Decrypt
23) Blowfish Encrypt
24) Boolean Permission implies(Permission permission)
25) CBC using DES with an IV based on a nonce In this case a hypothetical message number
26) Certificate and PublicKey
27) Certification for HTTPS
28) CertStore and CertStoreParameters
29) Check password based on MD5
30) Check password salt based on MD5
31) Checking ReadWrite Permission for a Directory
32) Configurable Access Control
33) Controlling Access to an Object using a permission
34) Create a 192 bit secret key from raw bytes
35) Create a 64 bit secret key from raw bytes
36) Create a Blowfish key, encrypts some text,prints the ciphertext, then decrypts the text
37) Create a checksum
38) Create a keystore with a self-signed certificate, using the keytool command
39) Create an encrypted string for password
40) Create SecretKey
41) Create the DSA key factory from a Set of Digital Signature Algorithm (DSA) Parameters
42) Create the DSA private key from a Set of Digital Signature Algorithm (DSA) Parameters
43) Create the DSA public key from a Set of Digital Signature Algorithm (DSA) Parameters
44) Creates a 1024 bit RSA key pair and stores it to the filesystem as two files
45) Creates an MD5 message digest from a file and displays it to the screen BASE64 Encoded
46) Creating a Certificate from a Certification Request
47) Creating a Certificate in Java
48) Creating a Certification Path
49) Creating a Certification Request
50) Creating a Keyed Digest Using MD5
51) Creating a New Key Pair and Self-Signed Certificate Using keytool
52) Creating a Self-Signed Version 1 Certificate
53) Creating a Self-Signed Version 3 Certificate
54) Creating a Signature
55) Creating Your Own Permissions
56) Cryptography Streams
57) Decrypt an object with DES
58) Define selector
59) Define your own security manager
60) DES Encrypt Console
61) DES Key Agreement
62) DESCBCPKCS5Padding Cipher
63) Determining If One Permission Implies Another
64) Diffie-Hellman Key Agreement
65) Diffie-Hellman with Elliptic Curve
66) Digest Input
67) Digest Stream
68) Digital Signature Algorithm Demo
69) Disabling Certificate Validation in an HTTPS Connection
70) Display properties of X509 Certificate
71) DSA Key Translator
72) DSA with Elliptic Curve
73) El Gamal example with random key generation
74) Enabling the Security Manager
75) Encode an MD5 digest into a String
76) Encoding an IV with ASN 1
77) Encrypt a password
78) Encrypt an object with DES
79) Encrypting a File or Stream with DES
80) Encrypting a String with DES
81) Encrypting with DES Using a Pass Phrase
82) Encryption and Decryption using Symmetric Keys
83) Export certificate in binary using keytool, if the certificate is in the key store
84) Export certificate in text format using keytool, if the certificate is in the key store
85) Export DSAPrivateKeySpec
86) Exporting a Certificate to a File
87) Extends BasicPermission
88) Extends java security Provider
89) Extends MessageDigest
90) Extends Provider
91) Extends SecurityManager
92) Generate a 576-bit DH key pair
93) Generate a Blowfish key
94) Generate a key for the HMAC-SHA1 keyed-hashing algorithm
95) Generate a random String suitable for use as a temporary password
96) Generate cert path for X 509
97) Generate X 509 certificate
98) Generates a 1024-bit Digital Signature Algorithm (DSA) key pair
99) Generating a MAC from a text input using a random key
100) Generating a Message Authentication Code (MAC) Key
101) Generating a Parameter Set for the Diffie-Hellman Key Agreement Algorithm
102) Generating a PublicPrivate Key Pair
103) Generating a Secure Random Number
104) Generating a Symmetric Key
105) Get a Provider
106) Get cryptographic security providers
107) Get MD5 Base64
108) Get peer certificate from SSL session
109) Get Provider Info
110) Get the bytes of the public and private keys
111) Get the formats of the encoded bytes
112) Getting the Bytes of a Generated Key Pair
113) Getting the Bytes of a Generated Symmetric Key
114) Getting the Digital Signature Algorithm (DSA) Parameters of a Key Pair
115) Getting the Subject and Issuer Distinguished Names of an X509 Certificate
116) Grant ability to create and write c
117) Grant ability to delete any file or directory in c
118) Grant ability to execute (see Runtime exec()) the file c
119) Grant ability to list files in the users home directory
120) Grant ability to read all properties that start with myprops
121) Grant ability to read all system properties
122) Grant ability to read and write all system properties
123) Grant ability to read and write any file in current directory
124) Grant ability to read and write the myprop system properties
125) Grant ability to read any file
126) Grant ability to read any file or directory under c
127) Grant ability to read any file under current directory
128) Grant ability to write all system properties
129) Grant ability to write the myprop system properties
130) Grant entry example
131) Grant runtime permission stop thread
132) Guard guard = new PropertyPermission(java home, read)
133) Hash 32 String
134) Hash 64 String
135) HTTPS Client
136) HTTPS Server
137) HTTPS Server Authentication
138) HTTPS Server Proxy
139) HTTPS Server using the JSSE
140) Https Socket Client
141) Implementing the Diffie-Hellman key exchange
142) Implements Key, PublicKey, PrivateKey
143) Implements PrivilegedAction
144) Implements SecretKey
145) Import certificate
146) Importing a Certificate from a File
147) Jdk policy file entries
148) JKS
149) JKS keystore
150) Key Agreement
151) Key Generator Demo
152) KeyStore Example
153) List properties for X 509 CRL
154) List the available capabilities for ciphers, key agreement, macs, message digests, signatures and other objects in the BC provide
155) Listing All Available Cryptographic Services
156) Listing All Permissions Granted to a Loaded Class
157) Listing All Permissions Granted to Classes Loaded from a URL or Directory
158) Listing the Aliases in a Key Store
159) Listing the Aliases in a Key Store using keytool
160) Listing the Most-Trusted Certificate Authorities (CA) in a Key Store
161) Mac creation
162) Make SHA Message
163) Make SHA Message with update methods
164) Masher a file
165) MD5 BASE64 checksum for the specified input string
166) MD5 hashing
167) MD5 MessageDigest
168) MD5 MessageDigest your message
169) MD5 String
170) MD5 your password
171) Message Digest Demo
172) Message without tampering with MAC (DES), encryption AES in CTR mode
173) New GuardedObject(Object obj, Guard)
174) Object GuardedObject getObject()
175) Password Authenticator
176) Password Storage Example
177) PBE File Encrypt
178) PBE key spec
179) PBE With SHA And Two fish
180) PermissionCollection pcoll = Policy getPolicy() getPermissions(domain)
181) PKIX Demo
182) Principal and Certificate
183) Print out X509Certificates properties
184) PSS parameter recovery and encoding
185) Read the first 8 bytes of the ciphertext and use that as the salt
186) Reading multiple certificates with a CertificateFactory
187) Receive Self Mac
188) Retrieving a Certificate from a Key Store
189) Retrieving a Key Pair from a Key Store
190) Retrieving the Certification Path of an SSL Server
191) Return the available implementations for a service type
192) Rich DES Key
193) RSA example with OAEP Padding and random key generation
194) RSA example with PKCS #1 Padding
195) RSA example with random key generation
196) RSA Signature Generation
197) Save SHA Message
198) Sealed Objects
199) Secure Random Demo
200) Security getProviders()
201) Seed a Secure Random
202) Send html(gif) file through SSLSocket
203) Set password salt
204) SHA MessageDigest
205) Show X 509 CRL entries
206) Signed Object
207) Signing a Java Object
208) Simple Digital Signature Example
209) Specify the keystore of certificates using the javax net ssl keyStore system property
210) SSL Client Demo
211) SSL Client Session
212) SSL Client Verifier
213) SSL Client with javax net ssl trustStore setting
214) SSL Server Session
215) SSL Server with KeyStore and Key Store Password setting
216) SSL Simple Client
217) SSL Simple Server
218) SSL Socket Client
219) SSL Socket Server
220) SSLContext and Key manager
221) Standard properies that can be read by anyone
222) Store Certificate
223) Sun SSL Socket Client
224) Sun SSL Socket Server
225) Symmetric encryption example with padding and CBC using DES with the initialization vector inline
226) Tampered message with HMac, encryption with AES in CTR mode
227) Tampered message, encryption with digest, AES in CTR mode
228) Tampered message, plain encryption, AES in CTR mode
229) The bytes can be converted back to public and private key objects
230) To create a 1024-bit RSA key
231) To ignore the policies in the java security file, and use the specified policy, use == instead of =
232) To specify an additional policy file, set the java security policy system property at the command line
233) Use AccessController to check the AWT permission
234) Use AccessController to check the file permission
235) Use DES to Decrypt
236) Use DSA to Sign
237) Use DSAKey
238) Use DSAPrivateKeySpec
239) Use grant command to set read permission
240) Use grant to set file permission
241) Use grant to set file permission based on user home and file separator
242) Use grant to set Property permission
243) Use grant to set Socket permission
244) Use grant to set the Runtime permission
245) Use HTTPS Server to transfer File
246) Use JKS
247) Use JKS KeyStore to load key
248) Use MAC
249) Use of X509EncodedKeySpec
250) Use Permission Collection
251) Use SecurityManager to check AWT permission and file permission
252) Use SHA1
253) Use SSLServerSocketFactory to create a SSL Server
254) Use X 509 certificate
255) Using Certificates in Java
256) Using CipherInputStream
257) Using CipherOutputStream
258) Using DigestInputStream
259) Using keytool to import a certificate into a keystore
260) Using the CertificateFactory Class
261) Using the KeyGenerator class and showing how to create a SecretKeySpec from an encoded key
262) Using the name DESede rather than TripleDES
263) Validate certificate
264) Validating a Certification Path using the most-trusted CAs in the JDKs cacerts file
265) Verifies the signature for the given buffer of bytes using the public key
266) X509 Certificate Selector